import * as echarts from 'echarts/core';
import { LineChart, RadarChart, BarChart, PieChart, FunnelChart, MapChart } from 'echarts/charts';
import {
  TooltipComponent,
  TitleComponent,
  LegendComponent,
  GridComponent,
  VisualMapComponent,
  MarkAreaComponent,
  GraphicComponent
} from 'echarts/components';
import { CanvasRenderer, SVGRenderer } from 'echarts/renderers';
import chinaJson from './map/china.json';

echarts.use([
  TooltipComponent,
  TitleComponent,
  LegendComponent,
  GridComponent,
  LineChart,
  RadarChart,
  CanvasRenderer,
  SVGRenderer,
  VisualMapComponent,
  MarkAreaComponent,
  GraphicComponent,
  BarChart,
  PieChart,
  FunnelChart,
  MapChart
]);
echarts.registerMap('china', chinaJson);

export default echarts;
